<template>
  <el-dialog
    title="提货异常填写单"
    :visible.sync="abnormalPopShowFn"
    :close-on-click-modal="false"
    width="40%"
    :before-close="handleClose"
  >
    <el-form
      :model="ruleFormAB"
      :rules="rulesAB"
      ref="ruleFormAB"
      label-width="150px"
      class="demo-ruleForm"
    >
      <el-form-item label="运单号" prop="waybill_no">
        <el-select multiple v-model="ruleFormAB.waybill_no">
          <el-option
            v-for="(item, index) in listdataFn.dispatch_waybills"
            :key="index"
            :value="item.waybill_id"
            :label="item.waybill_no"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="揽收异常件数" prop="abnormalNum">
        <el-input v-model="ruleFormAB.abnormalNum"></el-input>
      </el-form-item>
      <el-form-item label="揽收异常依据" prop="basis">
        <el-upload
          class="upload-demo"
          drag
          action="https://jsonplaceholder.typicode.com/posts/"
          multiple
        >
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
          <div class="el-upload__tip" slot="tip">
            只能上传jpg/png文件，且不超过500kb
          </div>
        </el-upload>
      </el-form-item>
      <el-form-item label="揽收异常原因" prop="desc">
        <el-input type="textarea" v-model="ruleFormAB.desc"></el-input>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancelFn">取 消</el-button>
      <el-button type="primary" @click="determineFn">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  name: "abnormalyesPop",
  props: ["abnormalPopShowFn", "listdataFn"],
  data() {
    return {
      ruleFormAB: {
        waybill_no: [],
        isAbnormal: "",
        abnormalNum: "",
        desc: "",
      },
      rulesAB: {},
    };
  },
  components: {},
  mounted() {
    // console.log(this.abnormalPopShowFn)
  },
  methods: {
    handleClose() {
      this.$emit("parentAbnormalFlagShow", false);
    },
    //取消函数方法
    cancelFn() {
      this.$emit("parentAbnormalFlagShow", false);
    },
    //确定按钮函数
    determineFn() {
      this.$emit("parentAbnormalFlagShow", false);
    },
  },
};
</script>